package com.codedef.cidaren.vo;

import com.codedef.cidaren.valid.AddGroup;
import com.codedef.cidaren.valid.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
public class CdkeyVo   {

    private Integer id;

    private String name;

    @NotBlank(message = "cdkey不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Size(min = 2, max = 100, message = "cdkey长度不合法", groups = {AddGroup.class, UpdateGroup.class})
    private String cdkey;

    private Integer userId;

    private String userIp;

    private Integer num;

    private Integer status;

    private Date createTime;

    private Date useTime;

    @NotBlank(message = "验证码不能为空", groups = {UpdateGroup.class})
    @Size(min = 2, max = 5, message = "验证码长度不合法", groups = {UpdateGroup.class})
    private String captcha;

}